import request from '@/utils/request'

// 查询车辆违章信息列表
export function listViolation(query) {
  return request({
    url: '/merchant/violation/list',
    method: 'get',
    params: query
  })
}

// 查询车辆违章信息详细
export function getViolation(id) {
  return request({
    url: '/merchant/violation/' + id,
    method: 'get'
  })
}

// 新增车辆违章信息
export function addViolation(data) {
  return request({
    url: '/merchant/violation',
    method: 'post',
    data: data
  })
}

// 修改车辆违章信息
export function updateViolation(data) {
  return request({
    url: '/merchant/violation',
    method: 'put',
    data: data
  })
}

// 删除车辆违章信息
export function delViolation(id) {
  return request({
    url: '/merchant/violation/' + id,
    method: 'delete'
  })
}
